<?php

function __autoload($class_name) {
	require_once ( "./$class_name.class.php" );
}

$cd=new ClientDecorateur("Renouard", "J.M" );

echo "<pre><u>";
$cd->faireCeci();
$cd->faireCela();
$cd->faireCa();
#echo $cd->nom;
#echo "</u></pre>";
#echo "<H1>".$cd->bidule."</H1>";


$c1=new client("Trameau", "Pierre");
$c2=new client("Duce", "Alexandre");

echo "<h3>Client C1</h3>";
foreach ($c1 as $prop => $val) {
	echo "<br/>$prop = $val";
}
echo "<hr>";

echo "<h3>Client C2</h3>";
foreach ($c2 as $prop => $val) {
	echo "<br/>$prop = $val";
}
echo "<hr>";

echo "<pre>";
print_r($c1);


echo "<hr></hr>";
echo "<pre>";
for ($i=0; $i< 10; $i++) {
	$label=$i%2==0?'riche':'pauvre';
	$criche1=ClientFactory::createInstance($label);
	print_r($criche1);
}

?>